package com.zzxy.spring.dao.impl;

import com.zzxy.spring.dao.IUserSpringDao;
import com.zzxy.spring.po.User;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.support.JdbcDaoSupport;

public class UserSpringDaoImpl extends JdbcDaoSupport implements IUserSpringDao {
   /* private JdbcTemplate jdbcTemplate;

    public JdbcTemplate getJdbcTemplate() {
        return jdbcTemplate;
    }

    public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
        this.jdbcTemplate = jdbcTemplate;
    }*/

    @Override
    public int insert(User user) {
        return this.getJdbcTemplate().update("insert into t_user values(null,?,?)",user.getUsername(),user.getPassward());
    }
}
